import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import *

testCase = "DBshop019_商品管理商品属性属性"

firefox=openBrowser(url)

firefox.get(urlAdmin)

DBshopLoginAdmin(firefox)

DBshopEnterMenu3(firefox,'商品管理','商品属性','属性')

firefox.find_element_by_xpath('(//a[@class="btn btn-small btn-primary"])[1]').click()

firefox.find_element_by_xpath('//option[text()="好好学习"]').click()

firefox.find_element_by_xpath('//option[text()="下拉"]').click()

firefox.find_element_by_id('attribute_name').send_keys('天天向上')

firefox.find_element_by_xpath('(//button[@class="btn btn-small btn-primary"])[1]').click()

try:
    firefox.find_element_by_link_text("编辑")

    writeLog("%s 测试通过" % testCase)
except:
    writeLog("%s 测试失败" % testCase)

    getPhoto(firefox)
firefox.quit()